package org.example.lotterysystem.dao.dataobject;

import java.math.BigDecimal;
import java.util.Objects;

public class PrizeDO extends BaseDO{

    /**
     * 奖品名
     */
    private String name;

    /**
     * 图片索引
     */
    private String imageUrl;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 描述
     */
    private String description;

    @Override
    public boolean equals(Object object) {
        super.equals(object);
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        PrizeDO prizeDo = (PrizeDO) object;
        return Objects.equals(name, prizeDo.name) && Objects.equals(imageUrl, prizeDo.imageUrl) && Objects.equals(price, prizeDo.price) && Objects.equals(description, prizeDo.description);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, imageUrl, price, description);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
